﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace Exdot
{
    public class IOLog
    {
        public void WriteFile(String log)
        {
            String date = DateTime.Now.ToShortDateString();
            StreamWriter sw = new StreamWriter(new FileStream("log.txt",FileMode.Append));
            sw.WriteLine(date+" : "+log);
            sw.Close();
        }
        public String ReadFile()
        {
            String s="";
            String line;
            StreamReader sr = new StreamReader(new FileStream("log.txt", FileMode.Open));
            while ((line=sr.ReadLine())!=null)
            {
                s += line + "\n";
            }
            sr.Close();
            return s;
        }
        public String exception()
        {
            String s = "";

            return s;
        }
    }
}
